/*
    main.me -- MakeMe for the Multithreaded Portable Runtime (MPR)
 */

Me.load({
    makeme: '>=0.9.0',

    plugins: [ 'installs' ],

    blend: [
        'src/*/*.me',
        'osdep',
    ],

    configure: {
        requires:  [ 'osdep' ],
    },

    settings: {
        prefixes: 'install-prefixes',
    },

    targets: {
        makerom: {
            type: 'exe',
            rule: 'gui',
            depends: [ 'libmpr' ],
            sources: 'src/makerom.c',
        },

        package: {
            depends: ['packagePak'],
        },

        packageSource: {},

        projects: {
            action: `genProjects('')`,
        },

        mine: {
            action: "genProjects('', 'mine', Config.OS + '-' + Config.CPU)",
        },
    },

    manifest: {
        packages: {
            pak: {
                inherit:    'package-manifest',
                prefixes:   [ 'src'],
                formats:    [ 'tar' ],
                sets:       [ 'pak' ],
            },
        },
        sets: { 
            pak: [
                {   
                    from:       'src/dist.me', 
                    to:         '${src}/dist/makerom.me',

                },{
                    from:    [ 'src/makerom.c' ], 
                    to:      '${src}/dist/',
                    flatten: true,

                },{
                    from:       'doc/contents/man/*.1',
                    to:         '${src}/doc/contents/man/',
                    relative:   'doc/contents/man',
                },
            ],
        },
	},
})
